// components/base/icon/index.js
const { BaseBehavior, COMPONENT_OPTIONS } = require('../../mixins/component');
Component({
    behaviors: [BaseBehavior],
    options: {
        ...COMPONENT_OPTIONS,
    },
    properties: {
        name: {
            type: String,
            value: '',
        },
        size: {
            type: Number,
            value: 42, // 默认42rpx
        },
        isCatch: {
            type: Boolean,
            value: false,
        },
    },
    methods: {
        clickAction() {
            const { isCatch } = this.data;
            this.triggerEvent('onClick', {}, { bubbles: !isCatch });
        },
    }
})
